package com.weipai.demo.controller;

import com.weipai.demo.service.LeadFloorService;
import com.weipai.demo.util.LayuiTablePagingResult;
import com.weipai.demo.util.Response;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: 赵项阳
 * @Date: 2019/7/2 10:15
 * @Version 1.0
 */
@RestController
public class LeadFloorController {

    @Autowired
    private LeadFloorService leadFloorService;

    //添加或修改资讯类别
    @RequestMapping(value = "/loansClass/save")
    public Response save(Integer id,String leadFloor,Integer status){
         return leadFloorService.save(id,leadFloor,status);
    }

    //删除资讯类别
    @RequestMapping(value = "/loansClass/deleteById")
    public Response deleteById(Integer id){
        return leadFloorService.deleteById(id);
    }

    //分页展示咨讯类别
    @RequestMapping(value = "/loansClass/pageShow")
    public LayuiTablePagingResult pageShow(Integer page,Integer size){
        return leadFloorService.pageShow(page,size);
    }

    //资讯文章展示资讯类别
    @RequestMapping(value = "/loansClass/newsShow")
    public Response newShow(Integer status){
       return leadFloorService.newsShow(status);
    }
}
